package cqie.frame.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 学生(Student)表实体类
 *
 * @author makejava
 * @since 2021-09-30 10:32:30
 */
@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("student")
@ApiModel(description = "学生表")
public class Student extends Model<Student> {
    //Id
    @TableId(value = "id",type = IdType.AUTO)
    @TableField(value = "id")
    @ApiModelProperty(value = "学生ID")
    private Long id;
    //姓名
    @TableField(value = "name")
    @ApiModelProperty(value = "学生姓名")
    private String name;
    //学号
    @TableField(value = "code")
    @ApiModelProperty(value = "学生学号")
    private String code;
    //性别(0:男 1:女)
    @TableField(value = "sex")
    @ApiModelProperty(value = "学生性别")
    private Integer sex;
    //联系电话
    @TableField(value = "mobile")
    @ApiModelProperty(value = "学生电话")
    private String mobile;
    //所在班级Id
    @TableField(value = "clazzId")
    @ApiModelProperty(value = "所在班级ID")
    private Long clazzId;
    //系统账号IdI
    @TableField(value = "userId")
    @ApiModelProperty(value = "所属用户ID")
    private Long userId;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    }

